<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>抽奖日志管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/wechat/lotteryLog/">抽奖日志列表</a></li>
		<shiro:hasPermission name="wechat:lotteryLog:edit"><li><a href="${ctx}/wechat/lotteryLog/form">抽奖日志添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="lotteryLog" action="${ctx}/wechat/lotteryLog/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<label>名称 ：</label><form:input path="name" htmlEscape="false" maxlength="50" class="input-medium"/>
		&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
	</form:form>
	<tags:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered ">
		<thead><tr><th>中奖者</th><th>奖品</th><th>手机号</th><th>状态</th><th>有效时间</th><shiro:hasPermission name="wechat:lotteryLog:edit"><th>操作</th></shiro:hasPermission></tr></thead>
		<tbody>
		<c:forEach items="${page.list}" var="lotteryLog">
			<tr>
				<td>${lotteryLog.member.name}</td>
				<td>${lotteryLog.lottery.name}</td>
				<td>${lotteryLog.member.mobile}</td>
				<td><c:if test="${seckillGainer.status == 1 }">已使用</c:if> <c:if test="${seckillGainer.status == 0 }">未使用<c:if test="${seckillGainer.valid eq false }">-<b style="color:red">已过期</b></c:if></c:if><c:if test="${seckillGainer.status == 2 }">已作废</c:if></td>
				<td>${lotteryLog.createTime}<br>${lotteryLog.endTime }</td>
				<shiro:hasPermission name="wechat:lotteryLog:edit"><td>
    				<a href="${ctx}/wechat/lotteryLog/form?id=${lotteryLog.id}">修改</a>
					<a href="${ctx}/wechat/lotteryLog/delete?id=${lotteryLog.id}" onclick="return confirmx('确认要删除该抽奖日志吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>
